<template>
  <div>
<!--    <div style="width: 100px;height: 100px;position: absolute;top: 0;left: 0;background-color: red;z-index: 9999999"></div>-->


  <a-config-provider :locale="locale">
    <div id="app">
      <router-view/>
    </div>
  </a-config-provider>
  </div>

</template>
<script>
var res = `
//     __  __     ____         _       __           __    __
//    / / / /__  / / /___     | |     / /___  _____/ /___/ /
//   / /_/ / _ \\/ / / __ \\    | | /| / / __ \\/ ___/ / __  /
//  / __  /  __/ / / /_/ /    | |/ |/ / /_/ / /  / / /_/ /
// /_/ /_/\\___/_/_/\\____/     |__/|__/\\____/_/  /_/\\__,_/
//
`
console.log(res)
  import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
  import enquireScreen from '@/utils/device'

  export default {
    data () {
      return {
        locale: zhCN,
      }
    },
    created () {
      let that = this
      enquireScreen(deviceType => {
        // tablet
        if (deviceType === 0) {
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
        }
        // mobile
        else if (deviceType === 1) {
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
        }
        else {
          that.$store.commit('TOGGLE_DEVICE', 'desktop')
          that.$store.dispatch('setSidebar', true)
        }

      })
    }
  }
</script>
<style>
  #app {
    height: 100%;
  }
</style>